<?php
namespace app\baidu\controller;
use app\AdminRest;
use think\App;
use app\baidu\model\AdminSetting as Model;
use think\facade\Cache;
use think\facade\Db;

class AdminSetting extends AdminRest
{

    protected $model;
    public function __construct(App $app) {
        parent::__construct($app);
        $this->model= new Model();
    }

    /**
     * User: chenniang
     * Date: 2019-12-18 14:30
     * @return void
     * descrption:配置回显|编辑
     */
    public function settingUpdate(){
       $input = $this->_input;
       if(count($input)>1){
           //编辑
           $data = $this->model->settingUpdate(['uniacid'=>$this->_uniacid],$input);
       }else{
           //回显
           $data = $this->model->settingInfo(['uniacid'=>$this->_uniacid]);
       }
        return $this->success($data);
    }










}
